﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Jifen.master" AutoEventWireup="true" CodeFile="Auction.aspx.cs" Inherits="SY.WebSite.Web.Jifen.Auction" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>正在拍卖 - 素币系统 - <%= Settings.Title %></title>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/template/trimpath-template.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/cookie.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">
    <dl class="tabs">
        <dd class="active"><a href="javascript:void(0);">查看全部</a></dd>
        <dd class=""><a href="javascript:void(0);">我关注的</a></dd>
        <dd class=""><a href="javascript:void(0);">我可竞拍的</a></dd>
    </dl>
    <div id="result"></div>

    <div id="secondPanel" class="panel" style="position:fixed; top: 200px; z-index:999999; width: 200px;"> 
        <p><a href="javascript:void(0);" onclick="page.fresh()">快速刷新</a></p>
        <p>剩余时间：<label></label></p>
    </div>
    
    <textarea name="auctionlist" id="auctionlist" style="display:none;">       
        {for l in list}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <div class="row">
                            <div class="nine columns info" style="min-height:150px;">
                                <img src="@{l.Image}" style="width:120px; height:120px; position:absolute;" alt="@{l.Title}" />
                                <div class="auction-info">
                                    <label class="title"><strong>@{l.Title}</strong></label>
                                    <label>￥@{l.Price}</label>
                                    <p>@{l.Description}</p>
                                    {if l.Bidder != 0}
                                    目前最高竞拍素币：&nbsp;&nbsp;<span>@{l.BidderName}</span>&nbsp;&nbsp;<label>@{l.BidAmount}</label>
                                    {/if}
                                </div>
                            </div>
                            <div class="three columns">
                                <input type="button" class="button small w120 @{page.checkWatch(l.Id, 1)}" onclick="page.watch(@{l.Id}, this)" value="@{page.checkWatch(l.Id, 2)}关注" /><br /><br />
                                <input type="button" class="button small w120" value="查看竞拍详情" onclick="page.showBid(@{l.AuctionId}, @{l.Id})" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {forelse}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <p>暂无{if page.list.length > 0}相关物品{elseif}竞拍{/if} :-)</p>
                        <p><a href="History.aspx">查看历史拍卖结果</a> &nbsp;&nbsp;&nbsp;<a href="My.aspx">查看我的拍卖纪录</a></p>
                    </div>
                </div>
            </div>
        {/for}
    </textarea>

    <textarea name="auction_detail" id="auction_detail" style="display:none;">     
        <div class="twelve columns">
            <div class="panel" style="margin-bottom:8px">
                <img src="@{Image}" style="width:120px; height:120px; position:absolute;" alt="@{Title}" />
                <div class="auction-info">
                    <label class="title"><strong>@{Title}</strong></label>
                    <label>￥@{Price}</label>
                    <p>@{Description}</p>
                    <p>
                        我要出价：<input type="text" class="text date" id="cAmount" style="width:90px"/>&nbsp;&nbsp;
                        <input type="button" class="small alert button" onclick="page.bid(@{AuctionId}, @{Id})" value="确定" />&nbsp;&nbsp;
                        <input type="button" class="small button" onclick="page.allIn()" value="全压" />&nbsp;&nbsp;
                        {if Bidder != 0 && Bidder != page.currentUser.userId}
                        <input type="button" id="btnCancel" style="display:none" class="small button" onclick="page.cancelBid(@{AuctionId}, @{Id})" value="撤销竞拍" />
                        {/if}<br />
                        <p>备注：需要至少超过当下最高者100素币&nbsp;|&nbsp;当前可用素币：<label class="currentAvailable type"></label></p>
                    </p>
                </div>
            </div>
            <div id="bilist"></div>
        </div>
        @{page.getBid(AuctionId, Id)}
    </textarea>

    <textarea name="bidlist" id="bidlist" style="display:none;">        
        <table class="niceTab" width="100%" cellspacing="0" cellpadding="0" border="0">
            <thead>
                <tr><th class="four">时间</th><th class="four">竞拍者</th><th class="four">素币数</th></tr>
            </thead>
            <tbody>
                {for l in list}
                    <tr><td class="center">@{l.CreateTime.ToDate().Format("yyyy-MM-dd hh:mm:ss.S")}</td><td class="center">@{l.UserName}</td><td class="center">@{l.Amount}</td></tr>
                {forelse}
                    <tr><td colspan="3" style="text-align:center;">暂无竞拍记录</td></tr>
                {/for}
            </tbody>
        </table>
    </textarea>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/jifen/auction.js" type="text/javascript"></script>
</asp:Content>

